﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ProjectFitus.Models;

namespace ProjectFitus.Controllers
{
	[HandleError]
	public class HomeController : Controller
	{
		//Bý til nýtt tilvik af Repository klasanum
		IDBFitusRepository m_repo = new DBFitusRepository();

		protected override void OnException(ExceptionContext fc)
		{
			base.OnException(fc);
			FitusLogger.Instance.LogException(fc.Exception);

		}

		public ActionResult Index()
		{
			System.Web.HttpRuntime.Cache["MenuItemsSub"] = m_repo.GetMenuItemsByParentId(1);
			ViewData["Message"] = "";
            return View();
		}
	}
}
